﻿
Ext.define('HIT.view.SetUserGrid', {
    extend: 'Ext.grid.Panel',
    alias: 'widget.setusergrid',
    
    cls: 'custom-grid',
    frame: false,
    width: 1200,
    columnLines: false,  
    store: 'UserRights',

    initComponent: function() {
        var me = this;

        Ext.applyIf(me, {
            columns: [
				
                {
                    xtype: 'rownumberer',
                    resizable: true,
                    width: 30
                },               											
                {
                    xtype: 'gridcolumn',
                    align: 'center',
                    dataIndex: 'loginName',
                    text: Share.T('登录名')
                },
                {
                    xtype: 'gridcolumn',
                    align: 'center',
                    dataIndex: 'userName',
                    text: Share.T('用户名')
                },
                {
                    xtype: 'gridcolumn',
                    width: 200,
                    align: 'left',
                    style:'text-align:center;',
                    dataIndex: 'email',
                    text:Share.T('用户ＥＭＡＩＬ')
                },
                {
                    xtype: 'gridcolumn',
                    align: 'left',
                    width: 220,
                    style:'text-align:center;',
                    dataIndex: 'company',
                    text: Share.T('公司')
                },
                {
                    xtype: 'gridcolumn',
                    align: 'center',
                    dataIndex: 'state',
                    text: Share.T('状态')
                },
                {
                    xtype: 'gridcolumn',
                    width: 200,
                    align: 'left',
                    style:'text-align:center;',
                    dataIndex: 'role',
                    text: Share.T('角色')
                },
                {
                    xtype: 'gridcolumn',
                    width: 330,
                    align: 'left',
                    style:'text-align:center;',
                    dataIndex: 'permission',
                    text: Share.T('数据权限')
                }
            ],
            viewConfig: {
            	enableTextSelection:true
            },
            selModel: Ext.create('Ext.selection.CheckboxModel', {
            	checkOnly: false
            }),
//            plugins :[{ptype:"rowselectionpaging"}],
            dockedItems: [
                {
                    xtype: 'pagingtoolbar',
                    dock: 'bottom',
                    width: 360,
                    inputItemWidth:45,
                    displayInfo: true,
                    store: 'UserRights',
                    plugins: [{
                        ptype: "pagesize",
                        uxPageSize: page_size}]
                }
            ]
        });

        me.callParent(arguments);
    }

});